European Patent No. EP 624 791 (corresponding to U.S. Pat. No. 5,329,806) describes a gas sensor where a sensor element is fixed in a tubular, metallic housing in a gas-tight manner. At its lower part, the tubular housing has a lip facing radially outward which forms a sealing flange. The gas sensor is mounted in an opening of an exhaust system, the lip sitting on a sealing seat formed in the opening. A banjo bolt is led over the housing and screwed into a thread arranged in the opening, thereby joining the lip to the exhaust system in a gas-tight manner. Problematic in this design is, however, that the pressing or upsetting of the relatively thin-walled material of the housing can produce microcracks at the lip which can cause the leakiness of the housing.